package com.srlg.webflux.service.impl;

import org.springframework.stereotype.Service;

import com.srlg.webflux.dao.BookDao;
import com.srlg.webflux.entity.Book;
import com.srlg.webflux.service.BookService;

import lombok.RequiredArgsConstructor;
import reactor.core.publisher.Mono;

@Service
@RequiredArgsConstructor
public class BookServiceImpl implements BookService {

    private final BookDao bookDao;

    @Override
    public Mono<Book> getBookAndAuthor(Long id) {

        return bookDao.findBookAndAuthorById(id);
    }

}
